Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from notebooks #21

Merged
merged 8 commits into from
Aug 27, 2023
Merged

Migrate from notebooks #21

merged 8 commits into from
Aug 27, 2023

Conversation

disberd
Copy link
Member

@disberd disberd commented Aug 24, 2023

This PR moves away from the package code being defined inside a single notebook and splits it into multiple files

It also changes the default way to server the plotly library. It now tries to save the bundled library locally on a generic path (obtained with BaseDirs.jl) and copy a copy of the bundled library file inside the pluto front-end folder so that it can be loaded simply with a relative path on the notebook.

If this fails, it reverts back to loading from URL.

This should fix #2 and avoid having a common window Plotly variable

The minimum julia version has been updated to 1.9

The way to extract the unique id for showing reliably multiple plots inside a same cell has been made more robust, in view of compatibility with logs from #5

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Patch coverage: 4.02% and project coverage change: -93.83% ⚠️

Comparison is base (16ea730) 100.00% compared to head (c2422fa) 6.17%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #21       +/-   ##
===========================================
- Coverage   100.00%   6.17%   -93.83%     
===========================================
  Files            2       9        +7     
  Lines            4     178      +174     
===========================================
+ Hits             4      11        +7     
- Misses           0     167      +167     
Files Changed Coverage Δ
src/PlutoPlotly.jl 100.00% <ø> (ø)
src/basics.jl 0.00% <0.00%> (ø)
src/js_helpers.jl 0.00% <0.00%> (ø)
src/local_plotly_library.jl 0.00% <0.00%> (ø)
src/mathjax.jl 0.00% <0.00%> (ø)
src/preprocess.jl 0.00% <0.00%> (ø)
src/show.jl 0.00% <0.00%> (ø)
src/main_struct.jl 63.63% <63.63%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This uses directly PublishedToJavascript when the function `core_published_to_js` is found
This is because from next Pluto version `publish_to_js` will be deprecated.

This commit also fixes the way automatic counters are computed in order to support logs
In logs the :extra_items key is not added to IO
This will help closing #5
@disberd disberd merged commit 6c1e466 into main Aug 27, 2023
@disberd disberd deleted the migrate-from-notebooks branch August 27, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

load plotly as ES6 module
2 participants